﻿using System.Windows.Data;
using System;
using System.Globalization;
using System.Windows;

namespace MSAP.Framework.Controls
{
    public class VisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                bool visible = (bool)value;
                if (visible == true) return Visibility.Visible;
            }
            return Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException("test");
        }
    }
}
